const api = {
	updateCloudWarehouse: '/cloud-warehouse/updateCloudWarehouse',
	addCloudWarehouse: '/cloud-warehouse/addCloudWarehouse',
	selectCloudWarehouseListByUserId: '/cloud-warehouse/selectCloudWarehouseListByUserId',
	deleteCloudWarehouseById: '/cloud-warehouse/deleteCloudWarehouseById'
};

// 修改云仓信息
export const updateCloudWarehouse = (data) => {
	return uni.$http.post(api.updateCloudWarehouse, data);
};

// 添加云仓信息
export const addCloudWarehouse = (data) => {
	return uni.$http.post(api.addCloudWarehouse, data);
};

// 根据用户id查询云仓信息
export const selectCloudWarehouseListByUserId = () => {
	// 这里假设userId是通过query传递的
	return uni.$http.get(api.selectCloudWarehouseListByUserId);
};

// 根据id删除云仓信息
export const deleteCloudWarehouseById = (id) => {
	// 这里假设id是通过query传递的
	return uni.$http.get(`${api.deleteCloudWarehouseById}/${id}`);
};